
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.Common;
using mfe.lib.data;

namespace mfe.bll
{
	public partial class ItemMovie
	{
        public ItemMovie(Guid ItemGuidID) { Get(ItemGuidID); }
        public virtual void Get(Guid ItemGuidID)
        {
            try
            {
                mfe.lib.data.Database db = mfe.lib.data.DatabaseFactory.CreateDatabase();
                DbCommand cmd = db.GetSqlStringCommand("select * from ItemMovie where ItemGuidID=@ItemGuidID");
                db.AddInParameter(cmd, "ItemGuidID", DbType.String, ItemGuidID.ToString());
                IDataReader reader = db.ExecuteReader(cmd);
                if (reader.Read())
                {
                    _SetupProperties(reader, this);
                }
                reader.Close();
                reader.Dispose();
            }
            catch (Exception ex)
            {
                mfe.lib.Logger.Log(ex);
            }
        }
	}
}
